package com.echo.im.common.exception;


import com.echo.im.common.result.ResultEnum;
import lombok.Data;

import java.io.Serializable;

/**
 * @author echo
 */
@Data
public class GlobalException extends RuntimeException implements Serializable {
    private static final long serialVersionUID = 8134030011662574394L;
    private Integer code;
    private String message;

    public GlobalException(ResultEnum resultEnum) {
        this.code = resultEnum.getCode();
        this.message = resultEnum.getMessage();
    }

}
